package cn.timeapi.Applet.Mall.CatSquare.common;

/**
 * @description:
 * @author: Vincent Vic
 * @email: vincent-vic@qq.com
 * @time: 2020/9/30 16:44
 */

public enum Constant {
    SUCCESS(0,"SUCCESS"),//成功状态
    ERROR(1,"ERROR"),//失败状态
    NEED_LOGIN(10,"NEED_LOGIN"),//需要登录
    ILLEGAL_ARGUMENT(400,"ILLEGAL_ARGUMENT"),//非法参数
    REQUIRED_ARGUMENT(401,"ILLEGAL_ARGUMENT"),//必传参数
    NEED_REGISTER(201,"NEED_LOGIN"),//需要登录
    NO_AUTHORITY(30,"NO_AUTHORITY"); // 无权限
    private final int code;
    private final String desc;

    Constant(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
